package cn.reinforce.web.fly.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.session.config.annotation.web.http.EnableSpringHttpSession;

/**
 * @author 幻幻Fate
 * @create 2018/03/14
 * @since
 */
@EnableSpringHttpSession
public class HttpSessionConfig {

    @Bean
    @ConfigurationProperties(prefix = "spring.redis")
    public LettuceConnectionFactory connectionFactory() {
        return new LettuceConnectionFactory();
    }

//    @Bean
//    public HttpSessionIdResolver httpSessionIdResolver() {
//        return HeaderHttpSessionIdResolver.xAuthToken();
//    }
}
